
import axios from 'axios'
export function request(config){
    const instance = axios.create({
      baseURL:'http://localhost:20000',
      timeout:5000
    })

    //拦截器
    instance.interceptors.request.use(request=>{
      return request
    },err=>{
      console.log(err)
    })

    instance.interceptors.response.use(response=>{
      return response.data
    },err=>{
      console.log(err)
    })
//zzz
    return instance(config)
}